home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
10,000 Great Games
/
10,000 Great Games.iso
/
Product
/
66
/
data1.cab
/
Source_Files
/
Src
/
Editable.h
< prev
next >
Wrap
C/C++ Source or Header
|
2000-01-16
|
2KB
|
96 lines
class cEditable : public cPositionable
{
public:
cEditable(cEditable **list, cGameObject *obj, int select);
~cEditable();
static void make_editables();
static void editables_layer_change();
static void delete_editables();
static void write_editables();
static void set_rectangle(int x, int y);
static void set_edge_rectangle(int x, int y);
static void rectangle_to_selection();
static int anything_selected();
static void unselect_editables();
static void delete_selected_editables();
static void snap_editables_to_grid();
static void drag_editables(int dx_back, int dy_back, int dx_game, int dy_game);
static cEditable *find(int x, int y);
virtual void write();
virtual int check_drag(int dx, int dy);
virtual void drag(int dx, int dy);
virtual void remove();
virtual void create_context_menu(CMenu *menu);
virtual void execute_context_menu(int id);
cEditable *sub_editables;
cGameObject *obj;
int selected;
protected:
static int walk_editables(int (*callback)(cEditable *e));
int walk_sub_editables(int (*callback)(cEditable *e));
};
class cEditableGameObject : public cEditable
{
public:
cEditableGameObject(cGameObject *obj, int select);
int check_drag(int dx, int dy);
void drag(int dx, int dy);
};
class cEditableWaypoint : public cEditable
{
public:
cEditableWaypoint(cGameObject *obj, cSpot *waypoint, int select);
void write();
void remove();
int check_drag(int dx, int dy);
void drag(int dx, int dy);
void create_context_menu(CMenu *menu);
void execute_context_menu(int id);
cSpot *waypoint;
};
class cEditableMovingStructure : public cEditableGameObject
{
public:
cEditableMovingStructure(cMovingStructure *obj, int select) : cEditableGameObject(obj, select) {}
void create_context_menu(CMenu *menu);
void execute_context_menu(int id);
};
class cEditableMovingStructureWaypoint : public cEditableWaypoint
{
public:
cEditableMovingStructureWaypoint(cGameObject *obj, cSpot *waypoint, int select) : cEditableWaypoint(obj, waypoint, select) {}
void create_context_menu(CMenu *menu);
void execute_context_menu(int id);
};
class cEditableTurret : public cEditableGameObject
{
public:
cEditableTurret(cTurret *obj, int select) : cEditableGameObject(obj, select) {}
void write();
void create_context_menu(CMenu *menu);
void execute_context_menu(int id);
};